package cn.tedu.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

    @RestController//想被浏览器访问
    @RequestMapping("/car")//按照指定的访问地址，来匹配这个类
public class CarController2 {
        //1，，，当访问了/car/get2时能够，成功的执行get（），，，handleMapping找到的映射关系
        //HandlerMapping --[/car/get2,/car/save.....]
        //测试:http://localhost:8080/car/get
        @RequestMapping("/get2")
        public  String  get(){
            return "访问成功！！你好Java！";
        }
        @RequestMapping("/save")
        //测试:http://localhost:8080/car/save
        public void save(){
            System.out.println("你好啊! java框架");
    }

}





